#pragma once

#include "GkBuffer.h"
#include "GkRenderTarget.h"
#include "GkRenderBinding.h"
#include "GkConstantBuffer.h"
#include "GkStateBlock.h"

namespace gk
{
	struct ContextInterface
	{
		virtual void BeginFrame() = 0;
		virtual void EndFrame() = 0;

		virtual void SetRenderTarget(RenderTargetHandle hRenderTarget) = 0;
		virtual void ClearRenderTarget(ClearType::Enum clearType, float r, float g, float b, float a, float depth, cr::uint8_t stencil) = 0;

		virtual void SetRenderBinding(RenderBindingHandle hRenderBinding) = 0;
		virtual void DrawIndexedPrimitives(BufferHandle hIndexBuffer, PrimitiveType::Enum primitiveType, cr::size_t indexCount, cr::size_t startIndex, cr::size_t vertexCount, cr::size_t startVertex) = 0;
		virtual void DrawPrimitives(PrimitiveType::Enum primitiveType, cr::size_t startVertex, cr::size_t numVertices) = 0;

		virtual void BeginGpuProgram(GpuProgramHandle hGpuProgram) = 0;
		virtual void EndGpuProgram() = 0;

// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, float v) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, float* v, cr::size_t numComponents) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, int v) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, int* v, cr::size_t numComponents) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, cr::Vec4fRef v) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, cr::Vec4f* v, cr::size_t numComponents) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, cr::Matrix4fRef v) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, cr::Matrix4f* v, cr::size_t numComponents) = 0;
// 		virtual void SetGpuProgramParameter(GpuProgramParameterHandle hParam, TextureHandle hTexture) = 0;

		virtual void CommitConstantBuffer(ConstantBufferHandle hConstantBuffer) = 0;
		virtual void CommitGpuProgram() = 0;
		virtual void CommitStateBlock(StateBlockHandle hStateBlock) = 0;
	};
}